<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
 <script src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">

       $(function () {

            $.ajax({
                url: "/chk_nname?/nick=yongzhou" ,
                type: "get",

                success: function (data) {
                    if (data.result != "ok") {
                        $(".msg").text("用户名[" + name + "]已经存在")
                        $("#nname").val("")
                    } else {
                        $(".msg").text("")
                    }

                }
            })

       })
            </script>
</head>
<body>

</body>
</html>